package com.zrz.service;

import java.util.Random;

public class RedWineCodeService {
    private  static String getRandomString(int length){
        String str="0123456789";
        String str2="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        Random random=new Random();
        StringBuffer sb=new StringBuffer();
        for(int i=0;i<length;i++){
            int number=random.nextInt(10);
            sb.append(str.charAt(number));
        }
        for(int i=0;i<2;i++){
            int number=random.nextInt(10);
            sb.append(str2.charAt(number));
        }
        return sb.toString();
    }
    public static void main(String args[]){
        for(int i=0;i<1000;i++){
            System.out.println(getRandomString(4));
        }

    }
}
